import React, { Component } from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import Home from '$views/Home';
import WriteBoard from '$views/WriteBoard';
import CustomWriteBoard from '$views/CustomWriteBoard';
import Translation from '$views/Translation';
import Grammar from '../views/Grammar';

export default class RouteContent extends Component {
  render() {
    return (
      <Switch>
        <Route exact path="/Home" component={Home} />
        <Route path="/WriteBoard" component={WriteBoard} />
        <Route path="/CustomWriteBoard" component={CustomWriteBoard} />
        <Route path="/Translation" component={Translation} />
        <Route path="/Grammar" component={Grammar} />
        <Redirect path="/" to={{ pathname: '/Home' }} />
      </Switch>
    );
  }
}
